package com.muyun.data.modeler.infrastructure.general.consts;

import com.muyun.data.modeler.infrastructure.general.exceptions.TipException;

import java.util.regex.Pattern;

/**
 * 常用正则表达式
 *
 * @author muyun12
 * @date 2020-12-22 20:47:34
 * @since 0.1.0
 */
public class PatternConsts {

    /**
     * 密码必须同时包含数字，大小写字母，特殊字符
     */
    public static final String PASSWORD_REGEX = "^.*(?=.*[a-z]+)(?=.*[A-Z]+)(?=.*\\d+)(?=.*\\W+)[A-Za-z\\d\\W]{8,16}$";
    //^(?![0-9]+$)(?![a-zA-Z]+$)(?![0-9a-zA-Z]+$)(?![0-9\W]+$)(?![a-zA-Z\W]+$)[0-9A-Za-z\W]{8,16}$

    private PatternConsts() {
        throw new TipException(MessageConsts.CAN_NOT_INSTANCE_CLASS);
    }

}
